import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class PictureCopy {
    public void pictureCopy(String sourcepath, String destinationpath){
        byte[] bin = new byte[4096];
        FileInputStream fin;
        try {
            fin = new FileInputStream(sourcepath);
            FileOutputStream fout = new FileOutputStream(destinationpath);
            while (fin.read(bin) != -1){
                fout.write(bin);
            }
            fin.close();
            fout.close();
        } catch (FileNotFoundException e){e.printStackTrace();}
        catch (IOException e){e.printStackTrace();}
        System.out.println("拷贝完成");
    }
}
